#region License
// /* **************************************************************
// * Copyright (C) intex Consulting GmbH - All Rights Reserved    *
// *--------------------------------------------------------------*
// * Unauthorized copying of this file, via any medium is         *
// * strictly prohibited                                          *
// *--------------------------------------------------------------*
// * Proprietary and confidential                                 *
// *--------------------------------------------------------------*
// * Dissasembling/modifications strictly prohibited!             *
// ***************************************************************/
#endregion

using System;
using System.Diagnostics.CodeAnalysis;
using ComHlp.enums;

namespace ComHlp.ContentClasses.FormDef
{
    [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
    [SuppressMessage("ReSharper", "UnusedMember.Global")]
    [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
    public class FormDefHeader : ICloneable
    {
        /// <summary> map title </summary>
        public string Title { get; set; }

        /// <summary> map name </summary>
        public string Name { get; set; }

        /// <summary> count of tabs at the upper border </summary>
        public int TabControlTabCount { get; set; }

        /// <summary> count of fields on the map </summary>
        public int MapFieldCount { get; set; }

        /// <summary> currently selected field </summary>
        public int FieldSelected { get; set; }

        /// <summary> first constraint on the map </summary>
        public int FirstConstraintIndex { get; set; }

        /// <summary> index of the first constraing on the map </summary>
        public int IndexFirstConstraint { get; set; }

        /// <summary> last used row == rowcount </summary>
        public int LastRow { get; set; }

        /// <summary> last used column == columncount  </summary>
        public int LastColumn { get; set; }

        /// <summary> first row </summary>
        public int FirstRow { get; set; }

        /// <summary> first column </summary>
        public int FirstColumn { get; set; }

        /// <summary> longest field length </summary>
        public int MaximumFieldLength { get; set; }

        /// <summary> longest constant length </summary>
        public int MaximumConstLength { get; set; }

        /// <summary> intex c/s protocol revision </summary>
        public int ProtocolRevision { get; set; }
        
        /// <summary> number of listviews on the map 
        /// not received by protocol, we count this up ourself </summary>
        public int InternalListViewCount { get; set; }

        /// <summary> fc/fcsonder row no </summary>
        public int InternalFcRowNo { get; set; }

        /// <summary> number of fields on the map with the name FKT 
        /// needed for the special upper right sided FKT field </summary>
        public int InternalFktFieldCount { get; set; }
        public ItxServerLanguage Language { get; set; }


        /// <summary> Default constructor </summary>
        public FormDefHeader()
        {
            Name = "";
            Title = "";
            InternalFcRowNo = -1;
            Language = ItxServerLanguage.English;
        }
        
        object ICloneable.Clone() { return Clone(); }
        // ReSharper disable once MemberCanBePrivate.Global
        public FormDefHeader Clone()
        {   
            FormDefHeader header = MemberwiseClone() as FormDefHeader;
            return header;
        }
    }
}